﻿using HK.Core.Common.Data;
using HK.Core.Common.Protocol.Data;
using HK.Editor.GUIEx.Data;
using HK.Editor.GUIEx.Protocol.Data;
using HK.Editor.GUIEx.Protocol.TreeView.Data;
using HK.Editor.GUIEx.Protocol.Window;
using HK.Editor.GUIEx.Window;

namespace HK.Editor.Defines.Protocol.Window
{
    /// <summary>
    /// 列定义 - 宏TableTree视图
    /// </summary>
    internal enum DefinesColumns
    {
        /// <summary>
        /// Id
        /// </summary>
        Id,
        /// <summary>
        /// 宏名
        /// </summary>
        Name,
        /// <summary>
        /// Android
        /// </summary>
        Android,
        /// <summary>
        /// iOS
        /// </summary>
        iOS,
        /// <summary>
        /// Pc
        /// </summary>
        Pc,
        /// <summary>
        /// Ps4
        /// </summary>
        Ps4,
        /// <summary>
        /// Ps5
        /// </summary>
        Ps5,
        /// <summary>
        /// XboxOne
        /// </summary>
        XboxOne,
        /// <summary>
        /// 操作方式
        /// <para>* 删除+修正</para>
        /// </summary>
        Operation
    }
    
    /// <summary>
    /// 排序选项 - 宏TableTree视图
    /// </summary>
    public enum DefinesSortOption
    {
        /// <summary>
        /// Id
        /// </summary>
        Id,
        /// <summary>
        /// 宏名
        /// </summary>
        Name,
        /// <summary>
        /// Android
        /// </summary>
        Android,
        /// <summary>
        /// iOS
        /// </summary>
        iOS,
        /// <summary>
        /// Pc
        /// </summary>
        Pc,
        /// <summary>
        /// Ps4
        /// </summary>
        Ps4,
        /// <summary>
        /// Ps5
        /// </summary>
        Ps5,
        /// <summary>
        /// XboxOne
        /// </summary>
        XboxOne
    }

    /// <summary>
    /// 宏编辑状态
    /// </summary>
    public enum DefineEditState
    {
        Idle,
        Editing
    }

    /// <summary>
    /// 宏定义窗体
    /// </summary>
    /// <typeparam name="TWin">窗体类型</typeparam>
    /// <typeparam name="TTree">窗体树形数据类型</typeparam>
    /// <typeparam name="TBranch">树枝类型</typeparam>
    public interface IDefinesWindow<TWin, out TTree, TBranch> : IMultiColsWindow<TWin, WindowConf, TTree>
        where TWin : WindowBase, IMultiColsWindow<TWin, WindowConf, TTree>
        where TTree : JsonData, IWindowData, IListJsonData<TBranch>
        where TBranch : JsonData, IListElement, ITreeBranch
    {
        /// <summary>
        /// 编辑状态
        /// </summary>
        DefineEditState State { get; }
    }
}
